sortcons is package{
  main() do {
    S is cons of {("alpha",1); ("beta",2); ("alpha",0); ("beta",10); ("gamma",1)}
    
    logMsg(info,"Sort $S to\n$(sort(S,<))");
    
    assert sort(S,<) = cons of {("alpha",0); ("alpha",1); ("beta",2); ("beta",10); ("gamma",1)};
    
    PS has type cons of integer;
    PS is iota(1,300,1);
    
    logMsg(info,"positive cons = $PS");
    
    CS has type cons of integer;
    CS is iota(300,1,-1);
    logMsg(info,"negative cons = $CS");
    
    
    SS is sort(CS,<);
    
    logMsg(info,"sorted is $SS");
    
    assert SS = PS;
  }
}